home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 626-637 / disk_634 / nonclick / source / nonclick106.s
Text File  |  1992-05-06  |  60KB  |  1,463 lines

  1.                    OPT l-,c+,d-,a+,o+
  2.  
  3.                    incdir "2:20_include/"                     ;where to look
  4.  
  5.                    include        intuition/intuition.i
  6. ;                   include        exec/exec_lib.i
  7.                    include        libraries/dos_lib.i       ;and DOS
  8.                    include        libraries/dos.i
  9.  
  10.  
  11. ;****************************************************************************
  12. ;*                                                                          *
  13. ;* NonClick V1.06 by Kjell Cederfeldt                     91-May-25         *
  14. ;*                                                                          *
  15. ;* Copyright (C) by Kjell Cederfeldt 1991. All rights reserved.             *
  16. ;*                                                                          *
  17. ;* Change NoClick flag in trackdisk.device. Note Rel 37 or later            *
  18. ;*                                                                          *
  19. ;* Written in  DevPac assembler on an A3000.                                *
  20. ;*                                                                          *
  21. ;*  Kjell Cederfeldt           Phone  +46 (0)31 - 306334 home               *
  22. ;*  Hammarkulletorget 39              +46 (0)31 - 139316 office             *
  23. ;*  S-442 37  ANGERED   SWEDEN        +46 (0)31 - 306310 support BBS        *
  24. ;*                                                                          *
  25. ;*  UseNet ...{uunet|pyramid|rutgers}!cbmvax!cbmehq!cbmswe!datac!kjell      *
  26. ;*                                                                          *
  27. ;****************************************************************************
  28.  
  29. ;                  Preset and definitions
  30. ;                  ----------------------
  31.  
  32. ExecBase           = 4
  33. OpenLibrary        = -552         ; exec offset       OpenLibrary(libName,version)(A1,D0)
  34. CloseLibrary       = -414         ; exec offset       CloseLibrary(library)(a1)
  35. FindTask           = -294         ; exec offset       FindTask(name)(a1)
  36. AddPort            = -354         ; exec offset       AddPort(port)(a1)
  37. RemPort            = -360         ; exec offset       RemPort(port)(a1)
  38. WaitPort           = -384         ; exec offset       WaitPort(port)(a0)
  39. GetMsg             = -372         ; exec offset       GetMsg(port)(a0)
  40. FindPort           = -390         ; exec offset       FindPort(name)(a1)
  41. PutMsg             = -366         ; exec offset       PutMsg(port,message)(a0/a1)
  42. ReplyMsg           = -378         ; exec offset       ReplyMsg(message)(a1)
  43. Forbid             = -132         ; exec offset       Forbid()
  44. AllocMem           = -198         ; exec offset       AllocMem(byteSize,requirements)(d0,d1)
  45. FreeMem            = -210         ; exec offset       FreeMem(memoryBlock,byteSize)(a1,d0)
  46. SetSignal          = -306         ; exec offset       SetSignal(newSignals,signalSet)(d0/d1)
  47. AllocSignal        = -330         ; exec offset       AllocSignal(signalNum)(d0)
  48. FreeSignal         = -336         ; exec offset       FreeSignal(signalNum)(d0)
  49. OpenDevice         = -444         ; exec offset       OpenDevice(devname,unit,iorequest,flags)(a0,d0/a1,a1)
  50. CloseDevice        = -450         ; exec offset       CloseDevice(IoRequest)(a1)
  51. DoIO               = -456
  52.  
  53. Write              = -48          ; dos offset        Write(fileHandler,buffer,length)(d1/d2/d3)
  54. OutPut             = -60          ; dos offset        OutPut()
  55.  
  56. DrawBorder         = -108         ; intuition         DrawBorder(Rastport,Border,Leftoffset,Toppoffset)(a0,a1/d0,d1)
  57. DrawImage          = -114         ; intuition         DrawImage(Rastport,Image,Leftoffset,Toppoffset)(a0,a1/d0,d1)
  58. PrintIText         = -216         ; intuition         PrintIText(Rastport,Itext,Leftoffset,Toppoffset)(a0,a1/d0,d1)
  59. OpenWindow         = -204         ; intuition         OpenWindow(owargs)(a0)
  60. _CloseWindow       = -72          ; intuition         CloseWindow(window)(a0)
  61. AutoRequest        = -348         ; intuition         AutoRequest(Window,Body,PTest,NText,PFlag,NFlag,W,H)
  62. RefreshGadgets     = -222         ; intuition         RefreshGadgets(Gadget,Window,Requester)(a0/a1/a2)
  63. RefreshGList       = -432         ; intuition         RefreshGList(Gadget,Window,Requester,NumGad)(a0/a1/a2,d0)
  64. OpenWindowTagList  = -606         ; intuition (37)    OpenWindowTagList(NewWindow,TagItems)(A0,A1)
  65. AddGadget          = -42                              AddGadget(Window,Gadget,Position)(A0,A1,D0)
  66.  
  67. RectFill           = -306         ; graphics          RectFill(RasterPort,xmin,ymin,xmax,ymax)(a1,d0,d1,d2,d3)
  68. SetAPen            = -342         ; graphics          SetAPen(RasterPort,Pen)(a1,d0)
  69. SetBPen            = -348         ; graphics          SetAPen(RasterPort,Pen)(a1,d0)
  70.  
  71. AddAppMenuItemA    = -72          ; workbench (37)    AddAppMenuItemA(id,userdata,text,msgport,taglist)(d0/d1,a0/a1/a2)
  72. RemoveAppMenuItem  = -78          ; workbench (37)    RemovAppMenuItem(appmenuitem)(a0)
  73.  
  74. OpenDiskFont       = -30
  75.  
  76.  
  77.  
  78. ;NT_MSGPORT         =      4               ;override by includes
  79. ;PA_SIGNAL          =      0               ;override by includes
  80. ;NT_MESSAGE         =      5               ;override by includes
  81. MEMF_TYPE          =      $10001
  82. MEMF_PUBLIC        =      $0000001
  83. MTYPE_CHIP         =      $0000002                    ; Memory type bits
  84. MEMF_CLEAR         =      $0010000
  85. MEMF_ANY_CLEAR     =      $10000
  86.  
  87.  
  88. ;******************************************************************************
  89. ;*
  90. ;*     Initiseringar !!!!
  91. ;*
  92.  
  93.  
  94.                    move.l sp,Initial_SP               ;Spara stackpekaren
  95.                    move.l a0,ArgList                  ;CLI=true spara adress till agument
  96.                    subq.l #1,d0                       ;Minska längden med 1
  97.                    add.l  d0,a0                       ;Addera längden till adressen
  98.                    move.b #0,(a0)                     ;Nolla sista byten (CLI=0A)
  99.  
  100.  
  101. ;*  CLI eller WB start ?
  102.  
  103.  
  104.                    move.l (ExecBase).w,a6             ;Execbase
  105.                    sub.l  a1,a1                       ;Hitta detta task
  106.                    jsr    FindTask(a6)
  107.                    move.l d0,a4                       ;spara strukturen i a4
  108.                    tst.l  $ac(a4)                     ;CLI eller WB ?
  109.                    bne.s  NoCopy
  110.  
  111.                    lea    $5c(a4),a0                  ;WBench message
  112.                    jsr    WaitPort(a6)                :vänta på meddelandet
  113.                    jsr    GetMsg(a6)                  ;hämta message
  114.                    move.l d0,Message                  ;spara pekare till WBMessage
  115.                    beq    Cleanup                     ;error?
  116.  
  117.  
  118.                    ; Already in use? We will not run another copy of this program.
  119.  
  120.                    move.l (ExecBase).w,a6             ;Execbase
  121.                    lea    PortName(pc),a1             ;leta efter egen port!
  122.                    jsr    FindPort(a6)                ;har vi redan en port?
  123.                    tst.l  d0
  124.                    beq.s  NoCopy                      ;Nej kör vidare!
  125.                    move.l d0,a0
  126.  
  127.                    lea    GgText3(pc),a1
  128.                    jsr    PutMsg(a6)                  ;sänd meddelande till porten
  129.                    bra    Cleanup                     ;och avsluta! (Väck första prog.)
  130. NoCopy:
  131.                    moveq  #0,d0
  132.                    move.l (ExecBase).w,a6
  133.                    lea    IntName(pc),a1
  134.                    jsr    OpenLibrary(a6)             ;öppna intuition
  135.                    move.l d0,IntBase
  136.                    beq    Cleanup                     ;fel? Avsluta
  137.  
  138.                    moveq  #37,d0
  139.                    lea    GrafName(pc),a1
  140.                    jsr    OpenLibrary(a6)             ;öppna graphiclibrary
  141.                    move.l d0,GrafBase
  142.                    beq    ReqError                    ;fel? Avsluta
  143.  
  144.                    tst.l  Message                     ;koll om StartWB el CLI?
  145.                    beq.s  CLIStart                    ;hopp till CLIStart om CLI
  146.  
  147.                    moveq  #37,d0
  148.                    lea    WBName(pc),a1               hämta namn 'workbench.library'
  149.                    jsr    OpenLibrary(a6)             öppna library
  150.                    move.l d0,WBBase                   spara hanterare.
  151.                    beq    ReqError                    ;fel? Avsluta
  152.  
  153.                    bra.s  Create                      ;hopp till Cleanup2 om CLI
  154.  
  155.  
  156. ;*****************************
  157.  
  158.  
  159. CLIStart:
  160.                    moveq  #0,d0
  161.                    lea    Dosname(pc),a1              ;Ladda adressen för DosName i a1
  162.                    moveq  #0,d0                       ;Tillåt alla dosversioner
  163.                    jsr    OpenLibrary(a6)             ;öppna doslibrary
  164.                    move.l d0,Dosbase                  ;Spara Dosbase
  165.                    beq    Cleanup                     ;Hoppa till Cleanup om fel!
  166.  
  167. ; hitta CLI dit jag kan sända text.
  168.  
  169.                    bsr    PointTOCLI                  ;Peka till CLI
  170.                    bsr    ScreenMSG                   ;Skriv text till Skärmen
  171.  
  172. ; Hämta argument från CLI
  173.  
  174. InNameArg:
  175.                    bsr    GetInArg                    ;Hämta argumenten från CLI
  176.  
  177.  
  178. Create:
  179.  
  180. ; Create Port
  181.  
  182.                    bsr    CreatePort
  183.                    tst.l  d0
  184.                    beq    Cleanup                     ;fel? Avsluta
  185.  
  186.  
  187. ; Create ExtIO
  188.  
  189.                    moveq  #56,d0
  190.                    move.l MyPort(pc),a0
  191.                    bsr    CreateExtIO
  192.                    move.l d0,MyIORequest
  193.                    beq    Cleanup                     ;fel? Avsluta
  194.  
  195. ; Vilkar drivar har vi i systemet ?
  196.  
  197.                    bsr    CheckConfig
  198.  
  199.                    tst.l  Message                     ;koll om StartWB el CLI?
  200.                    bne.s  WBINIT
  201.  
  202.                    tst.b  Inter                       ;koll om interface open window!
  203.                    bne.s  WBINIT
  204.  
  205.                    bsr    SetUnit
  206.                    bra    Cleanup
  207.  
  208.  
  209. WBINIT:            bsr    WinOpen                     ;öppna fönster
  210.                    bsr    BorderDraw
  211.                    bsr    RectDraw
  212.                    bsr    PrintText
  213.                    bsr    ImageDraw
  214.  
  215. Loop:
  216.                    move.l (ExecBase).w,a6             ;basadress till EXEC i a6
  217.                    move.l NewMessage(pc),d0
  218.                    beq.s  NoReply
  219.                    move.l d0,a1
  220.                    jsr    ReplyMsg(a6)
  221.                    move.l #0,NewMessage
  222.  
  223. NoReply:           move.l WinHandle(pc),a0            ;pekare till datastruktur i a0
  224.                    move.l 86(a0),a0                   ;userport-pekare i a0
  225.                    jsr    WaitPort(a6)
  226.                    move.l WinHandle(pc),a0            ;pekare till datastruktur i a0
  227.                    move.l 86(a0),a0                   ;userport-pekare i a0
  228.                    jsr    GetMsg(a6)                  ;hämta meddelande
  229.                    move.l d0,NewMessage
  230.                    beq.s  Loop                        ;ingen händelse
  231.  
  232.                    move.l d0,a0                       ;message-pekare i a0
  233.                    move.l $14(a0),d6                  ;spara händelsen i d6
  234.                    cmp.l  #GADGETDOWN,d6              ;gadget nedtryckt?
  235.                    beq.s  Ev1                         ;ja: kolla vilken
  236.                    cmp.l  #GADGETUP,d6                ;Gadget släppt?
  237.                    beq.s  Ev2                         ;ja: kolla vilken
  238.                    bra.s  Loop
  239.  
  240. Ev1:               bsr    DownGadgets
  241.                    bra.s  Loop
  242. Ev2:               bsr    UpGadgets
  243.  
  244.  
  245.                    bsr    ByeWindow
  246.                    tst.b  Inter                       ;koll om interface lägg ej till menyn
  247.                    bne.s  Cleanup
  248.  
  249.                    bsr    AddAppMenuIA                Lägg till ny menuitem (under tool)
  250.  
  251.                    move.l (ExecBase).w,a6             Execbase
  252.                    move.l MyPort(pc),a0
  253.                    jsr    WaitPort(a6)
  254.  
  255.                    move.l MyPort(pc),a0
  256.                    jsr    GetMsg(a6)                  ;hämta meddelande
  257.                    move.l d0,a1
  258.                    jsr    ReplyMsg(a6)
  259.  
  260.                    bsr    RemAppMenuIA                ta bort ny menuitem
  261.                    bsr    CheckConfig
  262.  
  263.                    bra    WBINIT
  264.  
  265. ; Här skall allt vara klar för att kunna avsluta (inga guru's tror du ?)
  266.  
  267.  
  268. Cleanup
  269.                    move.l (ExecBase).w,a6             Execbase
  270.                    move.l WBBase(pc),a1               hämta hanterare
  271.                    cmp.l  #0,a1
  272.                    beq.s  Cleanup1
  273.                    jsr    CloseLibrary(a6)            stäng workbench.library
  274. Cleanup1
  275.                    move.l disklib_base(pc),a1         hämta hanterare
  276.                    cmp.l  #0,a1
  277.                    beq.s  Cleanup2
  278.                    jsr    CloseLibrary(a6)            stäng workbench.library
  279. Cleanup2
  280.                    move.l GrafBase(pc),a1
  281.                    cmp.l  #0,a1
  282.                    beq.s  Cleanup3
  283.                    jsr    CloseLibrary(a6)
  284. Cleanup3
  285.                    move.l IntBase(pc),a1
  286.                    cmp.l  #0,a1
  287.                    beq.s  Cleanup4
  288.                    jsr    CloseLibrary(a6)
  289. Cleanup4
  290.                    move.l MyIORequest(pc),a1          ;hämta min IORequest
  291.                    cmp.l  #0,a1
  292.                    beq.s  Cleanup5                    ;blev den skapad?
  293.                    bsr    DeleteExtIO                 ;ja tag bort den!
  294. Cleanup5
  295.                    move.l MyPort(pc),d0               ;hämta min Port
  296.                    beq.s  Cleanup6                    ;blev den skapad?
  297.                    bsr    DeletePort                  ;ja tag bort porten
  298. Cleanup6
  299.                    move.l (ExecBase).w,a6             ;
  300.                    move.l Dosbase(pc),a1              ;Hämta Dosbase
  301.                    cmp.l  #0,a1                       ;blev dos öppnad?
  302.                    beq.s  Cleanup7                    ;nej!
  303.                    jsr    CloseLibrary(a6)            ;ja stäng Doslibrary:
  304. Cleanup7
  305.                    tst.l  Message                     ;koll om StartWB el CLI?
  306.                    beq.s  Cleanup8                    ;hopp till Cleanup6 om CLI
  307.                    move.l (ExecBase).w,a6
  308.                    jsr    Forbid(a6)
  309.                    move.l Message(pc),a1
  310.                    jsr    ReplyMsg(a6)
  311. Cleanup8
  312.                    move.l Initial_SP(pc),sp           ;Hämta start stacken
  313.                    moveq  #0,d0
  314.  
  315.                    rts                                ;Hej då!
  316.  
  317. ;****************************************************************************
  318. ;*
  319. ;*
  320. ;*  Subrutiner
  321. ;*
  322. ;*
  323. ;****************************************************************************
  324. ;*
  325. ;*
  326. ;*     Öppna Dos.library och spara dosbasen.
  327. ;*
  328. ;*
  329.  
  330. ;****************************************************************************
  331.  
  332. ;            ******* !! AutoRequest for WB !! ******************
  333. ReqError:
  334.                    move.l #0,a0
  335.                    lea    ReqText1(pc),a1
  336.                    lea    ReqTextPos(pc),a2
  337.                    move.l a2,a3
  338.                    moveq  #0,d0
  339.                    move.l d0,d1
  340.                    move.l #358,d2
  341.                    moveq  #80,d3
  342.                    move.l IntBase(pc),a6              ;basadress till Intuition
  343.                    jsr    AutoRequest(a6)
  344.  
  345.                    bra    Cleanup
  346.  
  347. ;****************************************************************************
  348.  
  349. SetUnit:
  350.                    lea    US0(pc),a5
  351.                    lea    U0(pc),a4
  352.                    moveq  #0,d5
  353. SetCheck:
  354.                    cmp.b  #'-',(a5,d5)
  355.                    beq.s  SetOff
  356. SetNext:
  357.                    cmp.b  #'+',(a5,d5)
  358.                    beq.s  SetOn
  359.  
  360. SetNextUnit:
  361.                    addq   #1,d5
  362.                    cmp.l  #4,d5
  363.                    bne.s  SetCheck
  364.                    rts
  365.  
  366. SetOff:
  367.                    cmp.b  #0,(a4,d5)
  368.                    beq.s  SetNextUnit
  369.                    move.l d5,d0
  370.                    bsr    OffClick
  371.                    bra.s  SetNextUnit
  372.  
  373. SetOn:
  374.                    cmp.b  #0,(a4,d5)
  375.                    beq.s  SetNextUnit
  376.                    move.l d5,d0
  377.                    bsr    OnClick
  378.                    bra.s  SetNextUnit
  379.  
  380.  
  381. ;****************************************************************************
  382.  
  383. PointTOCLI:
  384.                    move.l Dosbase(pc),a6              ;doslibrary pekare till
  385.                    jsr    OutPut(a6)                  ;hämta output pekare till Dos!
  386.                    move.l d0,CLIpoint                 ;Spara undan pekaren
  387.                    rts
  388.  
  389. ;****************************************************************************
  390.  
  391.  
  392. CreatePort
  393.                    move.l (ExecBase).w,a6             ;Laddar Execbase
  394.                    moveq  #-1,d0
  395.                    jsr    AllocSignal(a6)
  396.                    cmp.b  #-1,d0
  397.                    beq.s  Crt_Err
  398.                    move.l d0,sigbit
  399.  
  400.                    moveq  #34,d0                      längden på messagestrukturen
  401.                    move.l #MEMF_TYPE,d1               public-mem + clear
  402.                    jsr    AllocMem(a6)                allokera minne
  403.                    bne.s  CreateCount
  404.                    move.l sigbit(pc),d0
  405.                    jsr    FreeSignal(a6)
  406. Crt_Err            moveq  #0,d0
  407.                    rts
  408.  
  409. CreateCount
  410.                    move.l d0,MyPort                   Spara adressen till minne/MSGstrukturen
  411.                    move.l d0,a4                       samt till a4
  412.                    move.l #PortName,10(a4)            adressen till namnet
  413.                    move.b pri(pc),9(a4)               prioriteten
  414.                    move.b #NT_MSGPORT,8(a4)
  415.                    move.b #PA_SIGNAL,14(a4)
  416.                    move.l #0,a1
  417.                    jsr    FindTask(a6)                hitta vårt task
  418.                    move.l d0,16(a4)                   spara det
  419.                    move.l MyPort(pc),a1               adressen till MSGstrukturen
  420.                    jsr    AddPort(a6)                 lägg till porten
  421.                    move.l MyPort(pc),d0
  422.  
  423. EndCreatePort      rts
  424.  
  425. ;****************************************************************************
  426.  
  427. DeletePort
  428.                    move.l (ExecBase).w,a6             ;Ladda Execbase
  429.                    move.l MyPort(pc),a4               ;portsturkturen
  430.                    move.l MyPort(pc),a1
  431.                    jsr    RemPort(a6)                 avlägnsa porten
  432.  
  433.   ;* OBS Dessa två rader råder det tvivel om Det skiljer sig mellan RKM och
  434.   ;  Amiga System programer's guide. 
  435.  
  436.                    move.l #-1,16(a4)                  Enligt RKM manualen.
  437.                    move.l #$FF,(a4)                   Enligt Amiga System prog. guide
  438.  
  439.                    move.l #-1,20(a4)
  440.                    moveq  #0,d0
  441.                    move.b 15(a4),d0
  442.                    jsr    FreeSignal(a6)
  443.                    move.l MyPort(pc),a1               adressen till minnet vi allokerade
  444.                    moveq  #34,d0                      antal allokerade byte
  445.                    jsr    FreeMem(a6)                 frigör minnet.
  446.  
  447.  
  448. EndDelPort
  449.                    rts
  450. ;****************************************************************************
  451.                    even
  452.  
  453. ; CreateExtIO      Exec support function
  454. ;
  455. ; Input:           a0   = MsgPort
  456. ;                  d0.l = Size
  457.  
  458. CreateExtIO:       cmp.l  #0,a0
  459.                    beq.s  CEIO_Error
  460.  
  461.                    move.l a0,CEIO_Port
  462.                    move.w d0,CEIO_Size
  463.  
  464.                    move.l #MEMF_PUBLIC+MEMF_CLEAR,d1
  465.                    move.l (ExecBase).w,a6
  466.                    jsr    AllocMem(a6)
  467.                    tst.l  d0
  468. ;                   beq   CEIO_Error
  469.  
  470.                    move.l d0,a0
  471.                    move.b #NT_MESSAGE,8(a0)           ; Node Type
  472.                    move.w CEIO_Size(pc),18(a0)        ; NumBytes
  473.                    move.l CEIO_Port(pc),14(a0)        ; ReplyPort
  474.  
  475.                    rts
  476.  
  477. CEIO_Error:        moveq  #0,d0
  478.                    rts
  479.  
  480. CEIO_Port:         dc.l   0                           ; For CreateExtIO
  481. CEIO_Size:         dc.w   0
  482.  
  483.  
  484. ;****************************************************************************
  485.  
  486.  
  487. ; DeleteExtIO    Exec support function
  488. ;
  489. ; Input:           a1     = IORequest
  490.  
  491. DeleteExtIO:       cmp.l  #0,a1
  492.                    beq.s  DEIO_Error
  493.  
  494.                    move.b #$ff,8(a1)                  ; Node Type
  495.                    move.l #-1,20(a1)                  ; Device
  496.                    move.l #-1,24(a1)                  ; Unit
  497.  
  498.                    move.w 18(a1),d0                   ; Size
  499.                    ext.l  d0
  500.                    move.l (ExecBase).w,a6
  501.                    jsr    FreeMem(a6)
  502.  
  503. DEIO_Error:        rts
  504.  
  505. ;****************************************************************************
  506.  
  507.  
  508. ; Vilkar drivar har vi i systemet ?
  509.  
  510. CheckConfig:
  511.                    lea    U0(pc),a2
  512.                    lea    Act0(pc),a3
  513.                    lea    UW0(pc),a5
  514.                    moveq  #0,d5
  515. UnitCheck:
  516.                    move.l d5,d0                       ;Unit nr
  517.                    bsr.s  SmartOpen
  518.                    tst.l  d0
  519.                    bne.s  CheckNextUnit               ;No Unit Check next!
  520.                    bsr    AskClick
  521.                    move.b #1,(a2,d5)
  522.                    move.b d1,(a5,d5)
  523.                    move.l d5,d0                       ;Unit nr
  524.                    bsr.s  SmartClose
  525.  
  526. CheckNextUnit:
  527.                    addq   #1,d5
  528.                    add.l  #44,a3
  529.                    cmp.l  #4,d5
  530.                    bne.s  UnitCheck
  531.                    rts
  532.  
  533. ;****************************************************************************
  534. ;*
  535. ;*   SmartOpen
  536.  
  537. SmartOpen:
  538.                    move.l (ExecBase).w,a6             ;Execbase
  539.                    lea    DevName(pc),a0
  540.                    move.l MyIORequest(pc),a1
  541.                    moveq  #0,d1
  542.                    jsr    OpenDevice(a6)
  543.                    rts
  544.  
  545. ;****************************************************************************
  546. ;*
  547. ;*   SmartClose
  548.  
  549. SmartClose:
  550.                    move.l (ExecBase).w,a6             ;Execbase
  551.                    move.l MyIORequest(pc),a1
  552.                    jsr    CloseDevice(a6)
  553.                    rts
  554.  
  555. ;****************************************************************************
  556. ;*
  557. ;*        Ställer om trackdisk.device till NoClick
  558. ;
  559. OffClick:
  560.  
  561.                    bsr.s  SmartOpen
  562.                    tst.l  d0
  563.                    bne.s  EndOffClick                 ;error open
  564.                    move.l MyIORequest(pc),a1
  565.                    move.l 24(a1),a6                   io_Unit
  566.                    add.l  #53,a6                      PubFlags
  567.  
  568.                    BSET   #0,(a6)                     Bit 0 = NoClick
  569.  
  570.                    move.l (ExecBase).w,a6
  571.                    jsr    DoIO(a6)
  572.                    bsr.s  SmartClose
  573. EndOffClick        rts
  574.  
  575. ;****************************************************************************
  576. ;*
  577. ;*        Ställer om trackdisk.device till Click     (fy vad jag hatar Click)
  578. ;
  579.  
  580. OnClick:
  581.                    bsr.s  SmartOpen
  582.                    tst.l  d0
  583.                    bne.s  EndOnClick                  ;error open
  584.                    move.l MyIORequest(pc),a1
  585.                    move.l 24(a1),a6                   io_Unit
  586.                    add.l  #53,a6                      PubFlags
  587.  
  588.                    BCLR   #0,(a6)                     Bit 0 = Click
  589.  
  590.                    move.l (ExecBase).w,a6
  591.                    jsr    DoIO(a6)
  592.                    bsr.s  SmartClose
  593. EndOnClick         rts
  594.  
  595. ;****************************************************************************
  596.  
  597. AskClick:
  598.                    move.l MyIORequest(pc),a4
  599.                    move.l 24(a4),a4                   io_Unit
  600.                    add.l  #53,a4                      PubFlags
  601.                    BTST   #0,(a4)                     Bit 0 = Click
  602.                    bne.s  EndAskClick
  603.                    move.w #$2,(a3)
  604.                    move.b #'+',d1
  605.                    lea    GgText1(pc),a4
  606.                    move.l a4,14(a3)
  607.                    rts
  608. EndAskClick
  609.                    move.w #$82,(a3)
  610.                    move.b #'-',d1
  611.                    lea    GgText2(pc),a4
  612.                    move.l a4,14(a3)
  613.                    rts
  614.  
  615. ;****************************************************************************
  616.  
  617. Ok:                bra    SetUnit
  618.                    rts
  619.  
  620. ;****************************************************************************
  621.  
  622. Quit:              bsr    SetUnit
  623.                    bsr    ByeWindow
  624.                    bra    Cleanup
  625.  
  626. ;****************************************************************************
  627.  
  628. Cancel:            bsr    CheckConfig
  629.                    move.b UW0(pc),US0
  630.                    move.b UW1(pc),US1
  631.                    move.b UW2(pc),US2
  632.                    move.b UW3(pc),US3
  633.                    bra    SetUnit
  634.  
  635.  
  636. ;****************************************************************************
  637.  
  638. GetInArg:
  639.                    move.l ArgList(pc),a1              ;Hämta pekare til Arglistan
  640.                    cmp.b  #0,(a1)
  641.                    beq    ErrorMSG                    ;ja
  642.                    cmp.b  #'h',(a1)
  643.  
  644.                    beq    HelpMSG                     ;ja
  645.                    cmp.b  #'?',(a1)
  646.                    beq    HelpMSG                     ;ja
  647.  
  648. ArgInLoop          move.b (a1)+,d1                    ;flytta byte till d1
  649.                    cmp.b  #0,d1                       ;är arglista slut ?
  650.                    beq.s  ArgInEnd                    ;ja
  651.                    cmp.b  #'-',d1                     ;är introd ett '-' ?
  652.                    beq.s  ArgSet                      ;ja
  653.                    cmp.b  #'+',d1                     ;är introd ett '-' ?
  654.                    beq.s  ArgSet                      ;ja
  655.                    cmp.b  #' ',d1                     ;är introd ett '-' ?
  656.                    beq.s  ArgInLoop                   ;ja
  657.                    bra    ErrorMSG
  658.  
  659. ArgInEnd
  660.                    rts
  661.  
  662.  
  663. ArgSet
  664.                    cmp.b  #'h',(a1)
  665.                    beq    HelpMSG                     ;ja
  666.                    cmp.b  #'?',(a1)
  667.                    beq    HelpMSG                     ;ja
  668.                    cmp.b  #'i',(a1)
  669.                    beq    ArgSetFace                  ;ja
  670.                    move.b d1,Moj
  671. ArgSetloop
  672.  
  673.                    move.b (a1)+,d1                    ;flytta byte till d1
  674.                    cmp.b  #'a',d1
  675.                    beq.s  ArgSetAll                   ;ja
  676.                    cmp.b  #'0',d1
  677.                    beq.s  ArgSetSingel                ;ja
  678.                    cmp.b  #'1',d1
  679.                    beq.s  ArgSetSingel                ;ja
  680.                    cmp.b  #'2',d1
  681.                    beq.s  ArgSetSingel                ;ja
  682.                    cmp.b  #'3',d1
  683.                    beq.s  ArgSetSingel                ;ja
  684.                    bra    ErrorMSG
  685.  
  686. ArgSetAll
  687.                    move.b Moj(pc),US0
  688.                    move.b Moj(pc),US1
  689.                    move.b Moj(pc),US2
  690.                    move.b Moj(pc),US3
  691.                    bra.s  ArgSetEnd
  692.  
  693. ArgSetSingel
  694.                    lea    US0(pc),a3
  695.                    sub.b  #$30,d1
  696.                    add.l  d1,a3
  697.                    move.b Moj(pc),(a3)
  698.  
  699. ArgSetEnd
  700.                    cmp.b  #'-',(a1)
  701.                    beq    ArgInLoop
  702.                    cmp.b  #'+',(a1)
  703.                    beq    ArgInLoop
  704.                    cmp.b  #' ',(a1)
  705.                    beq    ArgInLoop
  706.                    cmp.b  #0,(a1)
  707.                    beq    ArgInLoop
  708.                    bra.s  ArgSetloop
  709.  
  710.  
  711. ArgSetFace
  712.                    move.b #1,Inter
  713.  
  714. FaceNext           move.b (a1)+,d1                    ;flytta byte till d1
  715.                    cmp.b  #' ',(a1)                   ;är nästa blank?
  716.                    beq.s  FaceNext                    ;ja läs nästa!
  717.                    cmp.b  #0,(a1)                     ;är det slut på raden?
  718.                    bne    ErrorMSG                    ;nej error
  719.                    rts
  720.  
  721.  
  722. WBChgSingel
  723. ;                   move.w #0,$dff180
  724.  
  725.                    lea    US0(pc),a3
  726.                    add.w  d6,a3
  727.                    lea    UW0(pc),a2
  728.                    add.w  d6,a2
  729.                    lea    ActTxt0(pc),a1
  730.  
  731.                    moveq  #44,d5
  732.                    mulu   d6,d5
  733.                    add.l  d5,a1
  734.  
  735.                    moveq  #0,d5
  736.                    move.b (a2),d5
  737.                    moveq  #6,d6
  738.                    eor.b  d6,d5
  739.                    move.b d5,(a2)
  740.                    move.b (a2),(a3)
  741.  
  742.                    lea    GgText1(pc),a3
  743.                    move.l (a1),d2
  744.                    move.l a3,d1
  745.  
  746.                    cmp.l  d1,d2
  747.                    bne.s  Byttext2
  748.                    lea    GgText2(pc),a3
  749.                    move.l a3,(a1)
  750.                    bra.s  Endbyttxt
  751. Byttext2           lea    GgText1(pc),a3
  752.                    move.l a3,(a1)
  753. Endbyttxt
  754.  
  755.                    bsr    ChgGadTxt
  756.                    rts
  757.  
  758. ;****************************************************************************
  759.  
  760.  
  761. ScreenMSG:
  762.                    move.l #SText1,d2                  ;pekare till textsträngen
  763.                    move.l #SText1E-SText1,d3          ;sträng längd
  764.                    bsr.s  TextWrite                   ;skriv strängen
  765.                    rts
  766.  
  767.  
  768. HelpMSG:
  769.                    move.l #HText1,d2
  770.                    move.l #HText1E-HText1-1,d3        ;sträng längd
  771.                    bsr.s  TextWrite
  772.                    bra    Cleanup
  773.                    rts
  774.  
  775.  
  776. ErrorMSG:          move.l #EText,d2                   ;pekare till Errortext
  777.                    move.l #ETextE-EText-1,d3          ;sträng längd
  778.                    bsr.s  TextWrite                   ;skriv strängen
  779.                    bra    Cleanup
  780.  
  781.  
  782. TextWrite:
  783.                    move.l Dosbase(pc),a6
  784.                    move.l CLIpoint(pc),d1
  785.                    jsr    Write(a6)
  786.                    rts
  787.  
  788. ;****************************************************************************
  789.  
  790. WinOpen:
  791.  
  792.                    move.l (ExecBase).w,a6
  793.                    lea    DiskFontName(pc),a1
  794.                    jsr    OpenLibrary(a6)             ;öppna intuition
  795.                    move.l d0,disklib_base
  796.                    beq    Cleanup                     ;fel? Avsluta
  797.  
  798.                    move.l disklib_base,a6             ;get ptr to diskfont.library
  799.                    lea    mydiskfont(pc),a0           ;load ptr to string
  800.                    jsr    OpenDiskFont(a6)            ;open the font
  801.                    move.l d0,myfont_base              ;save ptr to real font
  802.                    beq    Cleanup                     ;fel? Avsluta
  803.  
  804.                    move.l IntBase(pc),a6
  805.                    move.l #0,a0
  806.                    lea    WinTagList(pc),a1
  807.                    jsr    OpenWindowTagList(a6)
  808.                    move.l d0,WinHandle                ;sparar fönsterhanterare
  809.                    beq    Cleanup                     ;fel? Avsluta
  810.                    rts
  811.  
  812. ByeWindow:
  813.                    move.l (ExecBase).w,a6             ;basadress till EXEC i a6
  814.                    move.l NewMessage(pc),d0
  815.                    beq.s  WinClose
  816.                    move.l d0,a1
  817.                    jsr    ReplyMsg(a6)
  818.                    move.l #0,NewMessage
  819.  
  820. WinClose:          move.l IntBase(pc),a6
  821.                    move.l WinHandle(pc),a0
  822.                    jsr    _CloseWindow(a6)
  823.                    rts
  824.  
  825. ;****************************************************************************
  826.  
  827. AddAppMenuIA
  828.                    move.l WBBase(pc),a6               Hämta workbenchBase
  829.                    moveq  #1,d0                       dessa är nollade i testen ändast
  830.                    moveq  #0,d1                       se i autodoc WB.doc (2.0)
  831.                    move.l #0,a2
  832.                    move.l MyPort(pc),a1
  833.                    lea    PortName(pc),a0             MenuItem-text
  834.                    jsr    AddAppMenuItemA(a6)         lägg till under toolmeny ny Item
  835.                    move.l d0,MenuItemHandle           Spara item hanteraren
  836.                    rts
  837.  
  838. ;****************************************************************************
  839.  
  840. RemAppMenuIA
  841.                    move.l WBBase(pc),a6               ;Hämta workbenchBase
  842.                    move.l MenuItemHandle(pc),a0       ;Hämta hanteraren
  843.                    jsr    RemoveAppMenuItem(a6)       ;tag bort ur menyn
  844.                    rts
  845.  
  846. ;****************************************************************************
  847.  
  848. DownGadgets:                                          ;vilken gadgets tycktes?
  849.  
  850.                    move.l $1c(a0),a4                  ;hämta gadgets adress
  851.                    move.w $26(a4),d7                  ;hämta gadget ID#
  852.                    move.w d7,d6
  853.                    lea    DNGadgetTable(pc),a4        ;hämta adress till tabel
  854.                    mulu   #4,d7                       ;justera adressen
  855.                    move.l (a4,d7.w),a4                ;adressen till gadgetrutiner
  856.                    cmp    #0,a4                       ;ingen funktion för denna
  857.                    beq.s  EndDownGadgets              ;nej! Gör ingeting
  858.                    jmp    (a4)
  859. EndDownGadgets:    rts
  860.  
  861. UpGadgets:                                            ;vilken gadgets släpptes?
  862.  
  863.                    move.l $1c(a0),a4                  ;hämta gadgets adress
  864.                    move.w $26(a4),d7                  ;hämta gadget ID#
  865.                    lea    UPGadgetTable(pc),a4        ;hämta adress till tabel
  866.                    mulu   #4,d7                       ;justera adressen
  867.                    move.l (a4,d7.w),a4                ;adressen till gadgetrutiner
  868.                    cmp    #0,a4                       ;ingen funktion för denna
  869.                    beq.s  EndUpGadgets                ;nej! Gör ingeting
  870.                    jmp    (a4)
  871. EndUpGadgets:      rts
  872.  
  873. ;****************************************************************************
  874.  
  875. ChgGadTxt:
  876.                    move.l IntBase(pc),a6
  877.                    move.l WinHandle(pc),a1            ;pekare till fönster
  878.                    move.l GadgetList1(pc),a0          ;adressen till Gadgetlistan
  879.                    move.l #0,a2
  880.                    jsr    RefreshGadgets(a6)          ;uppdatera.
  881.                    rts
  882.  
  883.  
  884. ;****************************************************************************
  885.  
  886. BorderDraw:
  887.                    move.l IntBase(pc),a6
  888.                    move.l WinHandle(pc),a0
  889.                    lea    Border1A(pc),a1
  890.                    move   #10,d0
  891.                    move   #6,d1
  892.                    move.l 50(a0),a0
  893.                    jsr    DrawBorder(a6)
  894.                    rts
  895.  
  896. ;****************************************************************************
  897. ;
  898. RectDraw:
  899.                    move.l GrafBase(pc),a6
  900.                    move.l WinHandle(pc),a1
  901.                    move.l 50(a1),a1
  902.                    moveq  #3,d0
  903.                    jsr    SetAPen(a6)
  904.                    move.l WinHandle(pc),a1
  905.                    move.l 50(a1),a1
  906.                    moveq  #12,d0                      ;X-Min
  907.                    moveq  #7,d1                       ;Y-Min
  908.                    move.l #342,d2                     ;X-Max
  909.                    moveq  #26,d3                      ;Y-Max
  910.                    jsr    RectFill(a6)
  911.                    rts
  912.  
  913. ;****************************************************************************
  914.  
  915. PrintText:
  916.                    move.l IntBase(pc),a6
  917.                    move.l WinHandle(pc),a0
  918.                    move.l 50(a0),a0
  919.                    lea    NiceText(pc),a1
  920.                    moveq  #1,d0
  921.                    moveq  #1,d1
  922.                    jsr    PrintIText(a6)
  923.                    rts
  924.  
  925. ;****************************************************************************
  926.  
  927. ImageDraw:
  928.                    move.l IntBase(pc),a6
  929.                    lea    Image1(pc),a1
  930.                    move   #0,d0
  931.                    move   #0,d1
  932.                    move.l WinHandle(pc),a0
  933.                    move.l 50(a0),a0
  934.                    jsr    DrawImage(a6)
  935.                    rts
  936.  
  937.  
  938. ;****************************************************************************
  939. ;*
  940. ;                    mina data
  941. ;*
  942. ;****************************************************************************
  943.  
  944.  
  945. PortName:          dc.b   'NonClick',0
  946.                    even
  947. DevName:           dc.b   'trackdisk.device',0
  948.                    even
  949. Dosname:           dc.b   'dos.library',0
  950.                    even
  951. IntName:           dc.b   'intuition.library',0
  952.                    even
  953. GrafName:          dc.b   'graphics.library',0
  954.                    even
  955. WBName:            dc.b   'workbench.library',0
  956.                    even
  957. DiskFontName:      dc.b   'diskfont.library',0
  958.                    even
  959. SText1:            dc.b  10,'NonClick V1.06 (C) Copyright by Kjell'
  960.                    dc.b  ' Cederfeldt 1991',10,10
  961. SText1E:           even
  962.  
  963. HText1:
  964.                    dc.b  ' Programmed in 100% Assembler by Kjell Cederfeldt in'
  965.                    dc.b  ' May 1991',10,' This is Public Domain',10,10
  966.                    dc.b  'Usage: NonClick <-|+Unit#:>',10,10
  967.                    dc.b  '      -  Turn off Click | + Turn on Click',10
  968.                    dc.b  '      -a Turn off Click in all Units',10
  969.                    dc.b  '      +a Turn on  Click in all Units',10
  970.                    dc.b  '      -i Use WBInterface to set units',10
  971.                    dc.b  '         Valid Unit# from 0 to 3',10,10
  972. HText1E:           even
  973.  
  974. EText:
  975.                    dc.b 'Bad arguments, Usage "NonClick h or ?" for help',10,10,10
  976. ETextE:            even
  977.  
  978. WinTagList:
  979.                    dc.l   WA_Left,160
  980.                    dc.l   WA_Top,30
  981.                    dc.l   WA_Width,355
  982.                    dc.l   WA_Height,82
  983.                    dc.l   WA_IDCMP,GADGETUP+GADGETDOWN
  984.                    dc.l   WA_Gadgets,GadgetList1
  985.                    dc.l   WA_DetailPen,3,2
  986. ;                   dc.l   WA_Flags,ACTIVATE
  987.                    dc.l   TAG_DONE
  988.  
  989.  
  990. GadgetList1:                                ;** Här börjar min gadgets lista!
  991.  
  992. GadGetOk:          dc.l   GadGetQuit                  ; Further gadgets
  993.                    dc.w   29,59                       ; Position
  994.                    dc.w   52,13                       ; Hitbox size
  995.                    dc.w   2                           ; Hit action (0=inverted)
  996.                    dc.w   $1                          ; Activation flags
  997.                    dc.w   BOOLGADGET                  ; Gadget type
  998.                    dc.l   NormButtBordC               ; Image 1
  999.                    dc.l   NormButtBordD               ; Image 2
  1000.                    dc.l   GgText3                     ; first IntuiText structure
  1001.                    dc.l   0                           ; No exclude
  1002.                    dc.l   0                           ; SpecialInfo
  1003.                    dc.w   4                           ; Gadget Id#
  1004.                    dc.l   0                           ; User data
  1005.  
  1006. GadGetQuit:        dc.l   GadGetCancel                ; Further gadgets
  1007.                    dc.w   151,59                      ; Position
  1008.                    dc.w   52,13                       ; Hitbox size
  1009.                    dc.w   2                           ; Hit action (0=inverted)
  1010.                    dc.w   $1                          ; Activation flags
  1011.                    dc.w   BOOLGADGET                  ; Gadget type
  1012.                    dc.l   NormButtBordC               ; Image 1
  1013.                    dc.l   NormButtBordD               ; Image 2
  1014.                    dc.l   GgText4                     ; first IntuiText structure
  1015.                    dc.l   0                           ; No exclude
  1016.                    dc.l   0                           ; SpecialInfo
  1017.                    dc.w   5                           ; Gadget Id#
  1018.                    dc.l   0                           ; User data
  1019.  
  1020. GadGetCancel:      dc.l   GadGetUnit0                 ; Further gadgets
  1021.                    dc.w   272,59                      ; Position
  1022.                    dc.w   52,13                       ; Hitbox size
  1023.                    dc.w   2                           ; Hit action (0=inverted)
  1024.                    dc.w   $1                          ; Activation flags
  1025.                    dc.w   BOOLGADGET                  ; Gadget type
  1026.                    dc.l   NormButtBordC               ; Image 1
  1027.                    dc.l   NormButtBordD               ; Image 2
  1028.                    dc.l   GgText5                     ; first IntuiText structure
  1029.                    dc.l   0                           ; No exclude
  1030.                    dc.l   0                           ; SpecialInfo
  1031.                    dc.w   6                           ; Gadget Id#
  1032.                    dc.l   0                           ; User data
  1033.  
  1034.  
  1035. GadGetUnit0:       dc.l   GadGetUnit1                 ; Further gadgets
  1036.                    dc.w   22,42                       ; Position
  1037.                    dc.w   66,13                       ; Hitbox size
  1038. Act0:              dc.w   $100                        ; Hit action (0=inverted)
  1039.                    dc.w   $102                        ; Activation flags
  1040.                    dc.w   BOOLGADGET                  ; Gadget type
  1041.                    dc.l   NormButtBordA               ; Image 1
  1042.                    dc.l   NormButtBordB               ; Image 2
  1043. ActTxt0:           dc.l   GgText1                     ; first IntuiText structure
  1044.                    dc.l   0                           ; No exclude
  1045.                    dc.l   0                           ; SpecialInfo
  1046.                    dc.w   0                           ; Gadget Id#
  1047.                    dc.l   0                           ; User data
  1048.  
  1049. GadGetUnit1:       dc.l   GadGetUnit2                 ; Further gadgets
  1050.                    dc.w   103,42                      ; Position
  1051.                    dc.w   66,13                       ; Hitbox size
  1052. Act1:              dc.w   $100                        ; Hit action (0=inverted)
  1053.                    dc.w   $102                        ; Activation flags
  1054.                    dc.w   BOOLGADGET                  ; Gadget type
  1055.                    dc.l   NormButtBordA               ; Image 1
  1056.                    dc.l   NormButtBordB               ; Image 2
  1057. ActTxt1:           dc.l   GgText1                     ; first IntuiText structure
  1058.                    dc.l   0                           ; No exclude
  1059.                    dc.l   0                           ; SpecialInfo
  1060.                    dc.w   1                           ; Gadget Id#
  1061.                    dc.l   0                           ; User data
  1062.  
  1063. GadGetUnit2:       dc.l   GadGetUnit3                 ; Further gadgets
  1064.                    dc.w   184,42                      ; Position
  1065.                    dc.w   66,13                       ; Hitbox size
  1066. Act2:              dc.w   $100                        ; Hit action (0=inverted)
  1067.                    dc.w   $102                        ; Activation flags
  1068.                    dc.w   BOOLGADGET                  ; Gadget type
  1069.                    dc.l   NormButtBordA               ; Image 1
  1070.                    dc.l   NormButtBordB               ; Image 2
  1071. ActTxt2:           dc.l   GgText1                     ; first IntuiText structure
  1072.                    dc.l   0                           ; No exclude
  1073.                    dc.l   0                           ; SpecialInfo
  1074.                    dc.w   2                           ; Gadget Id#
  1075.                    dc.l   0                           ; User data
  1076.  
  1077. GadGetUnit3:       dc.l   0                           ; Further gadgets
  1078.                    dc.w   265,42                      ; Position
  1079.                    dc.w   66,13                       ; Hitbox size
  1080. Act3:              dc.w   $100                        ; Hit action (0=inverted)
  1081.                    dc.w   $102                        ; Activation flags
  1082.                    dc.w   BOOLGADGET                  ; Gadget type
  1083.                    dc.l   NormButtBordA               ; Image 1
  1084.                    dc.l   NormButtBordB               ; Image 2
  1085. ActTxt3:           dc.l   GgText1                     ; first IntuiText structure
  1086.                    dc.l   0                           ; No exclude
  1087.                    dc.l   0                           ; SpecialInfo
  1088.                    dc.w   3                           ; Gadget Id#
  1089.                    dc.l   0                           ; User data
  1090.  
  1091. NormButtBordA:     dc.w   0,0                         ; Zero offset
  1092.                    dc.b   2,0                         ; Colors
  1093.                    dc.b   0                           ; Mode (0=JAM1)
  1094.                    dc.b   5                           ; Line nodes
  1095.                    dc.l   NormButtLine1               ; Coordinates
  1096.                    dc.l   NormButtBordA2              ; Further structures
  1097.  
  1098. NormButtBordA2:    dc.w   0,0                         ; Zero offset
  1099.                    dc.b   1,0                         ; Colors
  1100.                    dc.b   0                           ; Mode (0=JAM1)
  1101.                    dc.b   5                           ; Line nodes
  1102.                    dc.l   NormButtLine2               ; Coordinates
  1103.                    dc.l   0                           ; Further structures
  1104.  
  1105.  
  1106. NormButtBordB:     dc.w   0,0                         ; Zero offset
  1107.                    dc.b   1,0                         ; Colors
  1108.                    dc.b   0                           ; Mode (0=JAM1)
  1109.                    dc.b   5                           ; Line nodes
  1110.                    dc.l   NormButtLine1               ; Coordinates
  1111.                    dc.l   NormButtBordB2              ; Further structures
  1112.  
  1113. NormButtBordB2:    dc.w   0,0                         ; Zero offset
  1114.                    dc.b   2,0                         ; Colors
  1115.                    dc.b   0                           ; Mode (0=JAM1)
  1116.                    dc.b   5                           ; Line nodes
  1117.                    dc.l   NormButtLine2               ; Coordinates
  1118.                    dc.l   0                           ; Further structures
  1119.  
  1120. ;*
  1121.  
  1122. NormButtBordC:     dc.w   0,0                         ; Zero offset
  1123.                    dc.b   2,0                         ; Colors
  1124.                    dc.b   0                           ; Mode (0=JAM1)
  1125.                    dc.b   5                           ; Line nodes
  1126.                    dc.l   NormButtLine3               ; Coordinates
  1127.                    dc.l   NormButtBordC2              ; Further structures
  1128.  
  1129. NormButtBordC2:    dc.w   0,0                         ; Zero offset
  1130.                    dc.b   1,0                         ; Colors
  1131.                    dc.b   0                           ; Mode (0=JAM1)
  1132.                    dc.b   5                           ; Line nodes
  1133.                    dc.l   NormButtLine4               ; Coordinates
  1134.                    dc.l   0                           ; Further structures
  1135.  
  1136.  
  1137. NormButtBordD:     dc.w   0,0                         ; Zero offset
  1138.                    dc.b   1,0                         ; Colors
  1139.                    dc.b   0                           ; Mode (0=JAM1)
  1140.                    dc.b   5                           ; Line nodes
  1141.                    dc.l   NormButtLine3               ; Coordinates
  1142.                    dc.l   NormButtBordD2              ; Further structures
  1143.  
  1144. NormButtBordD2:    dc.w   0,0                         ; Zero offset
  1145.                    dc.b   2,0                         ; Colors
  1146.                    dc.b   0                           ; Mode (0=JAM1)
  1147.                    dc.b   5                           ; Line nodes
  1148.                    dc.l   NormButtLine4               ; Coordinates
  1149.                    dc.l   0                           ; Further structures
  1150.  
  1151.  
  1152. NormButtLine1:     dc.w   66,0
  1153.                    dc.w   0,0
  1154.                    dc.w   0,13
  1155.                    dc.w   1,12
  1156.                    dc.w   1,1
  1157.  
  1158. NormButtLine2:     dc.w   1,13
  1159.                    dc.w   66,13
  1160.                    dc.w   66,1
  1161.                    dc.w   67,0
  1162.                    dc.w   67,13
  1163.  
  1164. NormButtLine3:     dc.w   52,0
  1165.                    dc.w   0,0
  1166.                    dc.w   0,13
  1167.                    dc.w   1,12
  1168.                    dc.w   1,1
  1169.  
  1170. NormButtLine4:     dc.w   1,13
  1171.                    dc.w   52,13
  1172.                    dc.w   52,1
  1173.                    dc.w   53,0
  1174.                    dc.w   53,13
  1175.  
  1176. GgText1:
  1177.                    dc.b   1,0          ;färger
  1178.                    dc.b   1            ;utskriftsätt
  1179.                    even
  1180.                    dc.w   7,2          ;X / Y position
  1181.                    dc.l   mydiskfont   ;Standardteckenuppsättning
  1182.                    dc.l   GgTxt1       ;pekare till texten
  1183.                    dc.l   0            ;ingen mer text
  1184. GgText2:
  1185.                    dc.b   1,0          ;färger
  1186.                    dc.b   1            ;utskriftsätt
  1187.                    even
  1188.                    dc.w   7,2          ;X / Y position
  1189.                    dc.l   mydiskfont   ;Standardteckenuppsättning
  1190.                    dc.l   GgTxt2       ;pekare till texten
  1191.                    dc.l   0            ;ingen mer text
  1192. GgText3:
  1193.                    dc.b   1,0          ;färger
  1194.                    dc.b   1            ;utskriftsätt
  1195.                    even
  1196.                    dc.w   20,2         ;X / Y position
  1197.                    dc.l   mydiskfont   ;Standardteckenuppsättning
  1198.                    dc.l   GgTxt3       ;pekare till texten
  1199.                    dc.l   0            ;ingen mer text
  1200. GgText4:
  1201.                    dc.b   1,0          ;färger
  1202.                    dc.b   1            ;utskriftsätt
  1203.                    even
  1204.                    dc.w   11,2         ;X / Y position
  1205.                    dc.l   mydiskfont   ;Standardteckenuppsättning
  1206.                    dc.l   GgTxt4       ;pekare till texten
  1207.                    dc.l   0            ;ingen mer text
  1208. GgText5:
  1209.                    dc.b   1,0          ;färger
  1210.                    dc.b   1            ;utskriftsätt
  1211.                    even
  1212.                    dc.w   4,2          ;X / Y position
  1213.                    dc.l   mydiskfont   ;Standardteckenuppsättning
  1214.                    dc.l   GgTxt5       ;pekare till texten
  1215.                    dc.l   0            ;ingen mer text
  1216.  
  1217.  
  1218. GgTxt1:
  1219.                    dc.b   ' Click ',0  ;unit-select
  1220.                    even
  1221. GgTxt2:
  1222.                    dc.b   'NoClick',0  ;unit-select
  1223.                    even
  1224. GgTxt3:
  1225.                    dc.b   'OK',0       ;Ok-gadget
  1226.                    even
  1227. GgTxt4:
  1228.                    dc.b   'QUIT',0     ;Quit-gadget
  1229.                    even
  1230. GgTxt5:
  1231.                    dc.b   'CANCEL',0     ;Quit-gadget
  1232.                    even
  1233.  
  1234.  
  1235. DNGadgetTable:
  1236. UPGadgetTable:
  1237.                    dc.l   WBChgSingel                 ;Gadget0 Df0:
  1238.                    dc.l   WBChgSingel                 ;Gadget1 Df1:
  1239.                    dc.l   WBChgSingel                 ;Gadget2 Df2:
  1240.                    dc.l   WBChgSingel                 ;Gadget3 Df3:
  1241. ;                   dc.l   0                           ;Gadget4 OK
  1242. ;                   dc.l   0                           ;Gadget5 QUIT
  1243. ;                   dc.l   0                           ;Gadget6 CANCEL
  1244. ;
  1245. ;UPGadgetTable:
  1246. ;                   dc.l   0                           ;Gadget0 Df0:
  1247. ;                   dc.l   0                           ;Gadget1 Df1:
  1248. ;                   dc.l   0                           ;Gadget2 Df2:
  1249. ;                   dc.l   0                           ;Gadget3 Df3:
  1250.                    dc.l   Ok                          ;Gadget4 OK
  1251.                    dc.l   Quit                        ;Gadget5 QUIT
  1252.                    dc.l   Cancel ;CheckConfig         ;Gadget6 CANCEL
  1253.  
  1254.  
  1255. Border1A:
  1256.                    dc.w   0,0              ;XY origin relative to container TopLeft
  1257.                    dc.b   1,0              ;Colors
  1258.                    dc.b   0                ;draw-mode
  1259.                    dc.b   5                ;number of XY vectors
  1260.                    dc.l   Vectors1         ;pointer to XY vectors
  1261.                    dc.l   Border1B         ;next border in list
  1262.  
  1263. Border1B:
  1264.                    dc.w   0,0              ;XY origin relative to container TopLeft
  1265.                    dc.b   2,0              ;Colors
  1266.                    dc.b   0                ;draw-mode
  1267.                    dc.b   5                ;number of XY vectors
  1268.                    dc.l   Vectors2         ;pointer to XY vectors
  1269.                    dc.l   0                ;ingen mer ram-lista.
  1270.  
  1271.  
  1272. Vectors1:
  1273.  
  1274.                    dc.w   333,0
  1275.                    dc.w   0,0
  1276.                    dc.w   0,21
  1277.                    dc.w   1,20
  1278.                    dc.w   1,1
  1279.  
  1280. Vectors2:
  1281.  
  1282.                    dc.w   1,21
  1283.                    dc.w   334,21
  1284.                    dc.w   334,0
  1285.                    dc.w   333,1
  1286.                    dc.w   333,20
  1287.  
  1288.  
  1289. NiceText:
  1290.  
  1291. Text1:             dc.b   2,3                         ;färger
  1292.                    dc.b   1                           ;utskriftsätt
  1293.                    even
  1294.                    dc.w   18,8                        ;textposition
  1295.                    dc.l   TOPAZ80 ;mydiskfont                  ;Standardteckenuppsättning
  1296.                    dc.l   Txt1                        ;pekare till texten
  1297.                    dc.l   Text2                       ;ingen mer text
  1298.  
  1299. Text2:             dc.b   2,3                         ;färger
  1300.                    dc.b   1                           ;utskriftsätt
  1301.                    even
  1302.                    dc.w   18,17                       ;textposition
  1303.                    dc.l   TOPAZ80 ;mydiskfont                  ;Standardteckenuppsättning
  1304.                    dc.l   Txt2                        ;pekare till texten
  1305.                    dc.l   TextU0                      ;ingen mer text
  1306.  
  1307. TextU0             dc.b   1,4                         ;färger
  1308.                    dc.b   1                           ;utskriftsätt
  1309.                    even
  1310.                    dc.w   40,31                       ;textposition
  1311.                    dc.l   TOPAZ80                     ;Standardteckenuppsättning
  1312.                    dc.l   TxtU0                       ;pekare till texten
  1313.                    dc.l   TextU1                      ;ingen mer text
  1314.  
  1315. TextU1:            dc.b   1,4                         ;färger
  1316.                    dc.b   1                           ;utskriftsätt
  1317.                    even
  1318.                    dc.w   121,31                      ;textposition
  1319.                    dc.l   TOPAZ80                     ;Standardteckenuppsättning
  1320.                    dc.l   TxtU1                       ;pekare till texten
  1321.                    dc.l   TextU2                      ;ingen mer text
  1322.  
  1323. TextU2:            dc.b   1,4                         ;färger
  1324.                    dc.b   1                           ;utskriftsätt
  1325.                    even
  1326.                    dc.w   202,31                      ;textposition
  1327.                    dc.l   TOPAZ80                     ;Standardteckenuppsättning
  1328.                    dc.l   TxtU2                       ;pekare till texten
  1329.                    dc.l   TextU3                      ;ingen mer text
  1330.  
  1331. TextU3:            dc.b   1,4                         ;färger
  1332.                    dc.b   1                           ;utskriftsätt
  1333.                    even
  1334.                    dc.w   281,31                      ;textposition
  1335.                    dc.l   TOPAZ80                     ;Standardteckenuppsättning
  1336.                    dc.l   TxtU3                       ;pekare till texten
  1337.                    dc.l   0                           ;ingen mer text
  1338.  
  1339. Txt1:              dc.b   'NonClick V1.06    Copyright 1991 by',0
  1340.                    even
  1341. Txt2:              dc.b   'Kjell Cederfeldt. This is Public Domain.',0
  1342.                    even
  1343. TxtU0:             dc.b   'DF0:',0
  1344.                    even
  1345. TxtU1:             dc.b   'DF1:',0
  1346.                    even
  1347. TxtU2:             dc.b   'DF2:',0
  1348.                    even
  1349. TxtU3:             dc.b   'DF3:',0
  1350.                    even
  1351.  
  1352. TOPAZ80:
  1353.                    dc.l   TOPAZname
  1354.                    dc.w   TOPAZ_EIGHTY
  1355.                    dc.b   0,0
  1356.  
  1357. TOPAZname:
  1358.                    dc.b   'topaz.font',0,0
  1359.                    even
  1360.  
  1361. mydiskfont:
  1362.                    dc.l   TOPAZname
  1363.                    dc.w   11
  1364.                    dc.b   0,0
  1365.  
  1366. ReqText1:          dc.b   0,1                         ;färger
  1367.                    dc.b   1                           ;utskriftsätt
  1368.                    even
  1369.                    dc.w   7,12                        ;textposition
  1370.                    dc.l   0                           ;standard textuppsättning
  1371.                    dc.l   ReqTxt1                     ;pekare till texten
  1372.                    dc.l   ReqText2                    ;ingen mer text
  1373.  
  1374. ReqText2:          dc.b   0,1                         ;färger
  1375.                    dc.b   1                           ;utskriftsätt
  1376.                    even
  1377.                    dc.w   27,23                       ;textposition
  1378.                    dc.l   0                           ;standard textuppsättning
  1379.                    dc.l   ReqTxt2                     ;pekare till texten
  1380.                    dc.l   0                           ;ingen mer text
  1381.  
  1382. ReqTextPos:        dc.b   0,1                         ;färger
  1383.                    dc.b   1                           ;utskriftsätt
  1384.                    even
  1385.                    dc.w   5,4                         ;textposition
  1386.                    dc.l   0                           ;standard textuppsättning
  1387.                    dc.l   ReqTxt3                     ;pekare till texten
  1388.                    dc.l   0                           ;ingen mer text
  1389.  
  1390. ReqTxt1:           dc.b   'You have to run NonClick under WB 2.0',0
  1391.                    even
  1392. ReqTxt2:           dc.b   'Release 37 or later. SORRY!',0
  1393.                    even
  1394. ReqTxt3:           dc.b   'I understand',0
  1395.                    even
  1396.  
  1397. ImageList:
  1398. Image1:
  1399.                    dc.w   136,7             ; X/Y avstånd
  1400.                    dc.w   21,11             ; Bredd och höjd
  1401.                    dc.w   2                 ; Antal bitplan
  1402.                    dc.l   StartImage1       ; Pekare till Image-Data
  1403.                    dc.b   3                 ; färg bitplan 1
  1404.                    dc.b   2                 ; färg bitplan 2
  1405.                    dc.l   0                 ; Inga fler Images
  1406.  
  1407. Initial_SP:        dc.l   0
  1408. Message:           dc.l   0
  1409. NewMessage:        dc.l   0
  1410. Dosbase:           dc.l   0
  1411. IntBase:           dc.l   0
  1412. GrafBase:          dc.l   0
  1413. disklib_base:      dc.l   0
  1414. myfont_base:       dc.l   0
  1415. WBBase:            dc.l   0
  1416. ArgList:           dc.l   0
  1417. CLIpoint:          dc.l   0
  1418. MyPort:            dc.l   0
  1419. MyIORequest:       dc.l   0
  1420. sigbit:            dc.l   0
  1421. WinHandle:         dc.l   0
  1422. MenuItemHandle:    dc.l   0
  1423. pri:               dc.b   0
  1424.                    even
  1425. U0:                dc.b   0
  1426. U1:                dc.b   0
  1427. U2:                dc.b   0
  1428. U3:                dc.b   0
  1429. US0:               dc.b   0
  1430. US1:               dc.b   0
  1431. US2:               dc.b   0
  1432. US3:               dc.b   0
  1433. UW0:               dc.b   0
  1434. UW1:               dc.b   0
  1435. UW2:               dc.b   0
  1436. UW3:               dc.b   0
  1437. Moj:               dc.b   0
  1438. Inter:             dc.b   0
  1439.                    even
  1440.  
  1441.                    SECTION foo,DATA_C
  1442.  
  1443. StartImage1:
  1444. ;                  INCBIN ram:NonClick.raw
  1445.  
  1446.                    dc.b   $FF,$FF,$F8,$00,$FC,$01,$F8,$00
  1447.                    dc.b   $E0,$F8,$38,$00,$C1,$CC,$18,$00
  1448.                    dc.b   $C3,$80,$18,$00,$83,$80,$08,$00
  1449.                    dc.b   $C3,$80,$18,$00,$C1,$CC,$18,$00
  1450.                    dc.b   $E0,$F8,$38,$00,$FC,$01,$F8,$00
  1451.                    dc.b   $FF,$FF,$F8,$00,$FC,$00,$F8,$00
  1452.                    dc.b   $E3,$FE,$38,$00,$DF,$07,$D8,$00
  1453.                    dc.b   $BE,$33,$E8,$00,$3C,$7F,$E0,$00
  1454.                    dc.b   $7C,$7F,$F0,$00,$3C,$7F,$E0,$00
  1455.                    dc.b   $BE,$33,$E8,$00,$DF,$07,$D8,$00
  1456.                    dc.b   $E3,$FE,$38,$00,$F8,$00,$F8,$00
  1457.  
  1458. EndImage1:
  1459.                    even
  1460. VersionTag         dc.b   0,'$VER: NonClick V37.1.06 (25.05.91)',0
  1461.                    even
  1462.                    end
  1463.